package com.qf.feigndemo.feign;

import com.qf.common.entity.User;
import com.qf.common.vo.R;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.*;

@FeignClient("user")
public interface UserClient {

    @GetMapping("/user/get/{id}")
    public R getUserById(@PathVariable("id") Integer id);

    @PostMapping("/user/add")
    public R addUser(@RequestBody User user);


    @PostMapping("/user/update")
    public R updateUser(@RequestParam("id") Long id,@RequestParam("name")String name,@RequestParam("age")Integer age);

    @DeleteMapping("/user/del/{id}")
    public R deleteUser(@PathVariable("id") Integer id);

}
